package cn.thornbird.orgsync.service;

import cn.thornbird.orgsync.entity.City;
import cn.thornbird.orgsync.exception.BadRequestException;
import cn.thornbird.orgsync.exception.NotFoundException;
import cn.thornbird.orgsync.model.PageList;
import cn.thornbird.orgsync.model.combined.CityObject;
import cn.thornbird.orgsync.vo.record.CityRecord;
import cn.thornbird.orgsync.vo.request.CityQueryRequest;

import java.util.List;

public interface CityService {

    CityObject find(String id) throws NotFoundException;

    List<CityObject> findAll();

    List<City> findCities(String parentId);

    PageList<CityObject> query(CityQueryRequest cityQueryRequest, Integer pageNumber, Integer pageSize);

    CityObject save(CityRecord cityRecord) throws BadRequestException, NotFoundException;

    CityObject delete(String id) throws BadRequestException, NotFoundException;

}
